jsx3.Class.defineClass(
        "tibco.admin.monitormanage.uicomponents.page.deployment.tabContent.serviceAssemblyOverview.ServiceAssemblyOverview", //the full name of the class to create
        jsx3.lang.Object, //  extends
        [tibco.admin.monitormanage.uicomponents.page.deployment.ServiceAssemblyTabInterface], // implements
        function (plugin) {
        
            plugin.instance = null

            plugin.getInstance = function(args) {
                if(!this.instance) {
                    this.instance = new tibco.admin.monitormanage.uicomponents.page.deployment.tabContent.serviceAssemblyOverview.ServiceAssemblyOverview();
                }
                return this.instance;
            }

            plugin.prototype.getNamespace = function() {
               return "tibco.admin";
            }
            
            plugin.prototype.getTabText = function() {
				return tibco.admin.Main.getServer().getDynamicProperty("@MM@general@OverviewTitle");
            	//return "Overview";
            }

            plugin.prototype.loadComponent = function(parent, serviceAssemblyId) {
                var overviewBlock = tibco.admin.Main.loadUIResource(parent, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/page/deployment/tabContent/serviceAssemblyOverview/components/serviceAssemblyOverview.xml", true);
                
                var serviceAssemblyContentPane = overviewBlock.getDescendantOfName("serviceAssemblyMainContentPane");
       			if(!tibco.admin.monitormanage || !tibco.admin.monitormanage.uicomponents || !tibco.admin.monitormanage.uicomponents.table || !tibco.admin.monitormanage.uicomponents.table.serviceUnits || !tibco.admin.monitormanage.uicomponents.table.serviceUnits.ServiceUnits)
               	{ tibco.admin.Main.loadClass("tibco/admin/monitormanage/uicomponents/table/serviceUnits/ServiceUnits.js", this.getNamespace()); }
               	var serviceUnitsTable = tibco.admin.Main.loadUIResource(serviceAssemblyContentPane, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/table/serviceUnits/components/serviceUnits.xml", true);
               	serviceUnitsTable.setUpComponent(tibco.admin.monitormanage.uicomponents.page.deployment.Deployment.serviceAssemblyScreenId, serviceAssemblyId);
               	tibco.admin.monitormanage.general.PollingHandler.register(tibco.admin.monitormanage.general.PollingHandler.GENERAL_POLLING_HANDLER_ID, serviceUnitsTable, serviceUnitsTable.updateComponent, tibco.admin.monitormanage.uicomponents.page.deployment.Deployment.serviceAssemblyScreenId);
               	tibco.admin.monitormanage.general.RefreshHandler.register(serviceUnitsTable, serviceUnitsTable.updateComponent, tibco.admin.monitormanage.uicomponents.page.deployment.Deployment.serviceAssemblyScreenId);
               	
               	var serviceAssemblyInfoPane = overviewBlock.getDescendantOfName("serviceAssemblyInfoPane");
       			if(!tibco.admin.monitormanage || !tibco.admin.monitormanage.uicomponents || !tibco.admin.monitormanage.uicomponents.text || !tibco.admin.monitormanage.uicomponents.text.serviceAssemblyInfo || !tibco.admin.monitormanage.uicomponents.text.serviceAssemblyInfo.ServiceAssemblyInfo)
               	{ tibco.admin.Main.loadClass("tibco/admin/monitormanage/uicomponents/text/serviceAssemblyInfo/ServiceAssemblyInfo.js", this.getNamespace()); }
               	var serviceAssemblyInfoObj = tibco.admin.Main.loadUIResource(serviceAssemblyInfoPane, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/text/serviceAssemblyInfo/components/serviceAssemblyInfo.xml", true);
               	serviceAssemblyInfoObj.setUpComponent();
            }
            
            plugin.prototype.updateComponent = function(serviceAssemblyId) {
            	// this method does not have to do anything considering the component update is
            	// handled by the components within this component
            	//jsx3.log("ServiceUnit overview tab with serviceAssemblyId = " + serviceAssemblyId); 
            }
            
            plugin.prototype.tabClicked = function(objEvent) {
            	tibco.admin.monitormanage.uicomponents.dropdown.timeframe.Timeframe.showTimeframe(tibco.admin.monitormanage.uicomponents.page.deployment.Deployment.serviceAssemblyScreenId);
        	}

        });